package com.itheima.controller;

/**
 * 图书查询界面管理
 */

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.entity.Result;
import com.itheima.service.SearchService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 图书查询
 */
@RestController
@RequestMapping("/search")
public class SearchController {
    @Reference
    private SearchService searchService;
    //分页查询
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        PageResult pageResult = searchService.pageQuery(queryPageBean);

        return pageResult;
    }

}
